.TH STEPDET 1 "6 March 2014" "WFDB 10.5.23" "WFDB Applications Guide"
.SH NAME
stepdet \- single-channel step change detector
.SH SYNOPSIS
\fBstepdet -r\fR \fIrecord\fR [ \fIoptions\fR ... ]
.SH DESCRIPTION
.PP
This program analyzes one signal of a PhysioBank-compatible \fIrecord\fR,
detecting and annotating rising and falling step changes.  Typically this
can be useful for finding transitions in a recorded digital stimulus or
event marker signal, especially if the signal is noise-contaminated (as
may occur if it has been recorded via an analog-to-digital converter).
.PP
\fIOptions\fR include:
.TP
\fB-a\fR \fIannotator\fR
Write annotations to the specified \fIannotator\fR (default: 'steps')
.TP
\fB-f\fR \fItime\fR
Begin at the specified \fItime\fR in \fIrecord\fR (default: the beginning of
\fIrecord\fR).
.TP
\fB-h\fR
Print a brief usage summary.
.TP
\fB-H\fR
Read the signal files in high-resolution mode (default: standard mode).
These modes are identical for ordinary records.  For multifrequency records,
the standard decimation of oversampled signals to the frame rate is suppressed
in high-resolution mode (rather, all other signals are resampled at the highest
sampling frequency).
.TP
\fB-m\fR \fItup tdown\fR
Specify thresholds for transitions from low to high (\fItup\fR, default: 550)
and from high to low (\fItdown\fR, default: 450).
.TP
\fB-s\fR \fIsignal\fR
Specify the \fIsignal\fR (number or name) to be used for step detection
(default: 0).
.TP
\fB-t\fR \fItime\fR
Process until the specified \fItime\fR in \fIrecord\fR (default: the end of the
\fIrecord\fR).
.PP
\fItup\fR is the threshold for detecting a rising step change (annotated
as 'R'), and \fItdown\fR is the threshold for detecting a falling ('F') step
change.  This program requires that \fItup\fR > \fItdown\fR.  Using its -m
option, set \fItup\fR to a value significantly greater than \fItdown\fR to
avoid false detections of transitions due to noise in the signal.  Noise spikes
that still cause false detections can often be avoided by median-filtering the
signal (see mfilt(1)) before using it as input to this program.
.SH ENVIRONMENT
.PP
It may be necessary to set and export the shell variable \fBWFDB\fR (see
\fBsetwfdb\fR(1)).
.SH SEE ALSO
\fBmfilt\fR(1)
.SH AUTHORS
George B. Moody (george@mit.edu).
.SH SOURCE
http://www.physionet.org/physiotools/wfdb/app/stepdet.c
